layui.config({
    base : "/layui/"
}).extend({
    index: 'lib/index'
}).use(['index','form','jquery', 'table'],function() {
    var form = layui.form,
        table = layui.table,
        admin = layui.admin;

    table.render({
        elem: '#agency_quota_apply_table'
        ,url: '/quota_apply_agency/queryData'
        ,method:"post"
        ,height: 500
        ,limit:50							//显示数目
        ,limits:[50,100]
        ,cols: [[
            {field:'levelId',width:200, title: '等级ID',"align":"left"}
            ,{field:'levelName',width:200, title: '等级名称',"align":"left"}
            ,{field:'quantity',width:200, title: '数量',"align":"left"}
            ,{field:'applyUserName',width:200, title: '申请人',"align":"left"}
            ,{field:'createdTime',width:200, title: '申请时间',"align":"left"}
            ,{field:'updatedTime',width:200, title: '审批时间',"align":"left"}
            ,{field:'message',width:200, title: '备注',"align":"left"}

            ,{field:'status',width:200, title: '状态',"align":"left",templet:function (d) {
                if(d.status==1){
                    return "已通过";
                }else if(d.status==-1){
                    return "已驳回"
                }else {
                    return "未处理";
                }
            }}

        ]]
        ,request:{
            pageName: 'pageNo' //页码的参数名称，默认：page
            ,limitName: 'pageSize' //每页数据量的参数名，默认：limit
        },
        where:{}
        ,id: 'agency_quota_apply_table'
        ,page: false
    });
});